﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DZH.TextSearch.Model
{
    public class PagerModel
    {
        public long DataCount { get; set; }
        public int PageSize { get; set; }
        public int Skip
        { 
            get 
            {
                return CurrPageID * PageSize;
            } 
        }
        public int PageCount
        {
            get
            {
                if (DataCount <= 0)
                    return 0;

                return (int)(DataCount / (long)PageSize) + 1;
            }
        }
        public int CurrPageID { get; set; }
    }
}
